import os
import uuid
from datetime import datetime, timedelta


from app import create_app, db
from app.models import User, Vehicle, Preference
from libs.utils import get_date, getEveryDay


def init_db():
    # pass
    User.init_db()
    Vehicle.init_db()
    Preference.init_db()


def test():
    get_date(datetime.now(), 10)



if __name__ == '__main__':
    flask_app = create_app(os.environ.get('ENV_TYPE', "development"))
    with flask_app.app_context():
        # TODO 启动执行
        init_db()

        # TODO 注释部分
        # allow_apply_by_applicant()
        # update_due_date_by_device_id()

